package com.chen.blue.service.business;

import com.chen.blue.domain.delete.business.ContestApplyDelete;
import com.chen.blue.domain.dto.business.ContestApplyDto;
import com.chen.blue.domain.dto.business.ContestPersonInfoDto;
import com.chen.blue.domain.dto.business.update.ContestApplyDtoEdit;
import com.chen.blue.domain.model.business.ContestApplyModel;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chen.blue.domain.query.business.ContestApplyQuery;
import com.chen.blue.domain.query.system.DeptQuery;
import com.chen.blue.domain.vo.business.ContestApplyVo;
import com.chen.blue.domain.vo.system.DeptVo;
import com.chen.blue.exception.e.DtoNullException;
import com.chen.blue.result.DataResult;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 竞赛表 服务类
 * </p>
 *
 * @author CLT
 * @since 2024-05-26
 */
public interface IContestApplyService extends IService<ContestApplyModel> {


    /**
     * 添加竞赛
     *
     * @param contestApplyDto
     * @return
     * @throws DtoNullException
     */
    boolean addContestApply(ContestApplyDto contestApplyDto) throws DtoNullException;

    /**
     * 删除竞赛
     *
     * @param contestApplyDelete
     * @return
     * @throws DtoNullException
     */
    boolean deleteContestApply(ContestApplyDelete contestApplyDelete) throws DtoNullException;

    /**
     * 更新竞赛
     *
     * @param contestApplyDtoEdit
     * @return
     * @throws DtoNullException
     */
    boolean updateContestApplyById(ContestApplyDtoEdit contestApplyDtoEdit) throws DtoNullException;

    /**
     * 给指定竞赛表添加人员信息
     *
     * @param id
     * @param contestPersonInfoDtoList
     * @return
     */
    boolean addRelationPersonInfo(Long applyId, List<ContestPersonInfoDto> contestPersonInfoDtoList) throws DtoNullException;

    /**
     * 条件查询竞赛
     *
     * @param contestApplyQuery
     * @return
     * @throws DtoNullException
     */
    DataResult<List<ContestApplyVo>> queryContestApply(ContestApplyQuery contestApplyQuery) throws DtoNullException;

    /**
     * 根据ID查询竞赛
     *
     * @param id
     * @return
     * @throws DtoNullException
     */
    DataResult<Map<String, Object>> queryContestApplyById(Long applyId) throws DtoNullException;

    /**
     * 查询所有部门
     *
     * @param deptQuery
     * @param isTree
     * @return
     * @throws DtoNullException
     */
    DataResult<List<DeptVo>> queryDept(DeptQuery deptQuery, boolean isTree) throws DtoNullException;

}
